#include <bits/stdc++.h>

using namespace std;

const int N=105;

int main() 
{
	int ret1=0,ret2=0;
	int n,m;cin>>n>>m;
	for(int x1=1;x1<n+1;x1++)
		for(int y1=1;y1<m+1;y1++)
			for(int x2=x1+1;x2<=n+1;x2++)
				for(int y2=y1+1;y2<=m+1;y2++)
				{
					int a=x2-x1,b=y2-y1;
					if(a==b) ret1++;
					else ret2++;
				}
	cout<<ret1<<" "<<ret2<<endl;	
	return 0;
}
